<html><body>
<style>

body, h1, h2, h3, div, span, p, pre, a {
  margin: 0;
  padding: 0;
  border: 0;
  font-weight: inherit;
  font-style: inherit;
  font-size: 100%;
  font-family: inherit;
  vertical-align: baseline;
}

body {
  font-size: 13px;
  padding: 1em;
}

h1 {
  font-size: 26px;
  margin-bottom: 1em;
}

h2 {
  font-size: 24px;
  margin-bottom: 1em;
}

h3 {
  font-size: 20px;
  margin-bottom: 1em;
  margin-top: 1em;
}

pre, code {
  line-height: 1.5;
  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}

pre {
  margin-top: 0.5em;
}

h1, h2, h3, p {
  font-family: Arial, sans serif;
}

h1, h2, h3 {
  border-bottom: solid #CCC 1px;
}

.toc_element {
  margin-top: 0.5em;
}

.firstline {
  margin-left: 2 em;
}

.method  {
  margin-top: 1em;
  border: solid 1px #CCC;
  padding: 1em;
  background: #EEE;
}

.details {
  font-weight: bold;
  font-size: 14px;
}

</style>

<h1><a href="adexchangebuyer_v1_4.html">Ad Exchange Buyer API</a> . <a href="adexchangebuyer_v1_4.marketplaceorders.html">marketplaceorders</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
  <code><a href="#get">get(orderId)</a></code></p>
<p class="firstline">Get an order given its id</p>
<p class="toc_element">
  <code><a href="#insert">insert(body)</a></code></p>
<p class="firstline">Create the given list of orders</p>
<p class="toc_element">
  <code><a href="#patch">patch(orderId, revisionNumber, updateAction, body)</a></code></p>
<p class="firstline">Update the given order. This method supports patch semantics.</p>
<p class="toc_element">
  <code><a href="#search">search(pqlQuery=None)</a></code></p>
<p class="firstline">Search for orders using pql query</p>
<p class="toc_element">
  <code><a href="#update">update(orderId, revisionNumber, updateAction, body)</a></code></p>
<p class="firstline">Update the given order</p>
<h3>Method Details</h3>
<div class="method">
    <code class="details" id="get">get(orderId)</code>
  <pre>Get an order given its id

Args:
  orderId: string, Id of the order to retrieve. (required)

Returns:
  An object of the form:

    { # Represents an order in the marketplace. An order is the unit of negotiation between a seller and a buyer and contains deals which are served. Each field in an order can have one of the following setting:
      #
      # (readonly) - It is an error to try and set this field. (buyer-readonly) - Only the seller can set this field. (seller-readonly) - Only the buyer can set this field. (updatable) - The field is updatable at all times by either buyer or the seller.
    "orderId": "A String", # The unique id of the order. (readonly).
    "kind": "adexchangebuyer#marketplaceOrder", # Identifies what kind of resource this is. Value: the fixed string "adexchangebuyer#marketplaceOrder".
    "seller": { # Reference to the seller on the order. (readonly, except on create)
      "subAccountId": "A String", # Optional sub-account id for the seller.
      "accountId": "A String", # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the offer.
    },
    "name": "A String", # The name for the order (updatable)
    "buyerPrivateData": { # Private data for buyer. (hidden from seller).
      "referenceId": "A String",
      "referencePayload": "A String",
    },
    "billedBuyer": { # Reference to the buyer that will get billed for this order. (readonly)
      "accountId": "A String", # Adx account id of the buyer.
    },
    "labels": [ # List of labels associated with the order. (readonly)
      {
        "createTimeMs": "A String", # The creation time (in ms since epoch) for the label.
        "deprecatedMarketplaceDealParty": { # Information about the party that created the label.
          "buyer": { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal-party.
            "accountId": "A String", # Adx account id of the buyer.
          },
          "seller": { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal party.
            "subAccountId": "A String", # Optional sub-account id for the seller.
            "accountId": "A String", # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the offer.
          },
        },
        "label": "A String", # The label to use.
        "accountId": "A String", # The accountId of the party that created the label.
      },
    ],
    "originatorRole": "A String", # Indicates whether the buyer/seller created the offer.(readonly)
    "revisionTimeMs": "A String", # The time (ms since epoch) when the order was last revised (readonly).
    "sellerContacts": [ # Optional contact information for the seller (buyer-readonly).
      {
        "email": "A String", # Email address of the contact.
        "name": "A String", # The name of the contact.
      },
    ],
    "lastUpdaterRole": "A String",
    "orderState": "A String", # The current state of the order. (readonly)
    "hasSellerSignedOff": True or False, # When an order is in an accepted state, indicates whether the buyer has signed off Once both sides have signed off on a deal, the order can be finalized by the seller. (buyer-readonly)
    "isRenegotiating": True or False, # True if the order is being renegotiated (readonly).
    "buyer": { # Reference to the buyer on the order. (readonly, except on create)
      "accountId": "A String", # Adx account id of the buyer.
    },
    "hasBuyerSignedOff": True or False, # When an order is in an accepted state, indicates whether the buyer has signed off Once both sides have signed off on a deal, the order can be finalized by the seller. (seller-readonly)
    "isSetupComplete": True or False, # True, if the buyside inventory setup is complete for this order. (readonly)
    "revisionNumber": "A String", # The revision number for the order (readonly).
    "lastUpdaterOrCommentorRole": "A String", # The role of the last user that either updated the order or left a comment. (readonly)
    "buyerContacts": [ # Optional contact information fort the buyer. (seller-readonly)
      {
        "email": "A String", # Email address of the contact.
        "name": "A String", # The name of the contact.
      },
    ],
  }</pre>
</div>

<div class="method">
    <code class="details" id="insert">insert(body)</code>
  <pre>Create the given list of orders

Args:
  body: object, The request body. (required)
    The object takes the form of:

{
    "webPropertyCode": "A String",
    "orders": [ # The list of orders to create.
      { # Represents an order in the marketplace. An order is the unit of negotiation between a seller and a buyer and contains deals which are served. Each field in an order can have one of the following setting:
          #
          # (readonly) - It is an error to try and set this field. (buyer-readonly) - Only the seller can set this field. (seller-readonly) - Only the buyer can set this field. (updatable) - The field is updatable at all times by either buyer or the seller.
        "orderId": "A String", # The unique id of the order. (readonly).
        "kind": "adexchangebuyer#marketplaceOrder", # Identifies what kind of resource this is. Value: the fixed string "adexchangebuyer#marketplaceOrder".
        "seller": { # Reference to the seller on the order. (readonly, except on create)
          "subAccountId": "A String", # Optional sub-account id for the seller.
          "accountId": "A String", # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the offer.
        },
        "name": "A String", # The name for the order (updatable)
        "buyerPrivateData": { # Private data for buyer. (hidden from seller).
          "referenceId": "A String",
          "referencePayload": "A String",
        },
        "billedBuyer": { # Reference to the buyer that will get billed for this order. (readonly)
          "accountId": "A String", # Adx account id of the buyer.
        },
        "labels": [ # List of labels associated with the order. (readonly)
          {
            "createTimeMs": "A String", # The creation time (in ms since epoch) for the label.
            "deprecatedMarketplaceDealParty": { # Information about the party that created the label.
              "buyer": { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal-party.
                "accountId": "A String", # Adx account id of the buyer.
              },
              "seller": { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal party.
                "subAccountId": "A String", # Optional sub-account id for the seller.
                "accountId": "A String", # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the offer.
              },
            },
            "label": "A String", # The label to use.
            "accountId": "A String", # The accountId of the party that created the label.
          },
        ],
        "originatorRole": "A String", # Indicates whether the buyer/seller created the offer.(readonly)
        "revisionTimeMs": "A String", # The time (ms since epoch) when the order was last revised (readonly).
        "sellerContacts": [ # Optional contact information for the seller (buyer-readonly).
          {
            "email": "A String", # Email address of the contact.
            "name": "A String", # The name of the contact.
          },
        ],
        "lastUpdaterRole": "A String",
        "orderState": "A String", # The current state of the order. (readonly)
        "hasSellerSignedOff": True or False, # When an order is in an accepted state, indicates whether the buyer has signed off Once both sides have signed off on a deal, the order can be finalized by the seller. (buyer-readonly)
        "isRenegotiating": True or False, # True if the order is being renegotiated (readonly).
        "buyer": { # Reference to the buyer on the order. (readonly, except on create)
          "accountId": "A String", # Adx account id of the buyer.
        },
        "hasBuyerSignedOff": True or False, # When an order is in an accepted state, indicates whether the buyer has signed off Once both sides have signed off on a deal, the order can be finalized by the seller. (seller-readonly)
        "isSetupComplete": True or False, # True, if the buyside inventory setup is complete for this order. (readonly)
        "revisionNumber": "A String", # The revision number for the order (readonly).
        "lastUpdaterOrCommentorRole": "A String", # The role of the last user that either updated the order or left a comment. (readonly)
        "buyerContacts": [ # Optional contact information fort the buyer. (seller-readonly)
          {
            "email": "A String", # Email address of the contact.
            "name": "A String", # The name of the contact.
          },
        ],
      },
    ],
  }


Returns:
  An object of the form:

    {
    "orders": [ # The list of orders successfully created.
      { # Represents an order in the marketplace. An order is the unit of negotiation between a seller and a buyer and contains deals which are served. Each field in an order can have one of the following setting:
          #
          # (readonly) - It is an error to try and set this field. (buyer-readonly) - Only the seller can set this field. (seller-readonly) - Only the buyer can set this field. (updatable) - The field is updatable at all times by either buyer or the seller.
        "orderId": "A String", # The unique id of the order. (readonly).
        "kind": "adexchangebuyer#marketplaceOrder", # Identifies what kind of resource this is. Value: the fixed string "adexchangebuyer#marketplaceOrder".
        "seller": { # Reference to the seller on the order. (readonly, except on create)
          "subAccountId": "A String", # Optional sub-account id for the seller.
          "accountId": "A String", # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the offer.
        },
        "name": "A String", # The name for the order (updatable)
        "buyerPrivateData": { # Private data for buyer. (hidden from seller).
          "referenceId": "A String",
          "referencePayload": "A String",
        },
        "billedBuyer": { # Reference to the buyer that will get billed for this order. (readonly)
          "accountId": "A String", # Adx account id of the buyer.
        },
        "labels": [ # List of labels associated with the order. (readonly)
          {
            "createTimeMs": "A String", # The creation time (in ms since epoch) for the label.
            "deprecatedMarketplaceDealParty": { # Information about the party that created the label.
              "buyer": { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal-party.
                "accountId": "A String", # Adx account id of the buyer.
              },
              "seller": { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal party.
                "subAccountId": "A String", # Optional sub-account id for the seller.
                "accountId": "A String", # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the offer.
              },
            },
            "label": "A String", # The label to use.
            "accountId": "A String", # The accountId of the party that created the label.
          },
        ],
        "originatorRole": "A String", # Indicates whether the buyer/seller created the offer.(readonly)
        "revisionTimeMs": "A String", # The time (ms since epoch) when the order was last revised (readonly).
        "sellerContacts": [ # Optional contact information for the seller (buyer-readonly).
          {
            "email": "A String", # Email address of the contact.
            "name": "A String", # The name of the contact.
          },
        ],
        "lastUpdaterRole": "A String",
        "orderState": "A String", # The current state of the order. (readonly)
        "hasSellerSignedOff": True or False, # When an order is in an accepted state, indicates whether the buyer has signed off Once both sides have signed off on a deal, the order can be finalized by the seller. (buyer-readonly)
        "isRenegotiating": True or False, # True if the order is being renegotiated (readonly).
        "buyer": { # Reference to the buyer on the order. (readonly, except on create)
          "accountId": "A String", # Adx account id of the buyer.
        },
        "hasBuyerSignedOff": True or False, # When an order is in an accepted state, indicates whether the buyer has signed off Once both sides have signed off on a deal, the order can be finalized by the seller. (seller-readonly)
        "isSetupComplete": True or False, # True, if the buyside inventory setup is complete for this order. (readonly)
        "revisionNumber": "A String", # The revision number for the order (readonly).
        "lastUpdaterOrCommentorRole": "A String", # The role of the last user that either updated the order or left a comment. (readonly)
        "buyerContacts": [ # Optional contact information fort the buyer. (seller-readonly)
          {
            "email": "A String", # Email address of the contact.
            "name": "A String", # The name of the contact.
          },
        ],
      },
    ],
  }</pre>
</div>

<div class="method">
    <code class="details" id="patch">patch(orderId, revisionNumber, updateAction, body)</code>
  <pre>Update the given order. This method supports patch semantics.

Args:
  orderId: string, The order id to update. (required)
  revisionNumber: string, The last known revision number to update. If the head revision in the marketplace database has since changed, an error will be thrown. The caller should then fetch the lastest order at head revision and retry the update at that revision. (required)
  updateAction: string, The proposed action to take on the order. (required)
    Allowed values
      accept - 
      cancel - 
      propose - 
      unknownAction - 
      updateFinalized - 
  body: object, The request body. (required)
    The object takes the form of:

{ # Represents an order in the marketplace. An order is the unit of negotiation between a seller and a buyer and contains deals which are served. Each field in an order can have one of the following setting:
    # 
    # (readonly) - It is an error to try and set this field. (buyer-readonly) - Only the seller can set this field. (seller-readonly) - Only the buyer can set this field. (updatable) - The field is updatable at all times by either buyer or the seller.
  "orderId": "A String", # The unique id of the order. (readonly).
  "kind": "adexchangebuyer#marketplaceOrder", # Identifies what kind of resource this is. Value: the fixed string "adexchangebuyer#marketplaceOrder".
  "seller": { # Reference to the seller on the order. (readonly, except on create)
    "subAccountId": "A String", # Optional sub-account id for the seller.
    "accountId": "A String", # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the offer.
  },
  "name": "A String", # The name for the order (updatable)
  "buyerPrivateData": { # Private data for buyer. (hidden from seller).
    "referenceId": "A String",
    "referencePayload": "A String",
  },
  "billedBuyer": { # Reference to the buyer that will get billed for this order. (readonly)
    "accountId": "A String", # Adx account id of the buyer.
  },
  "labels": [ # List of labels associated with the order. (readonly)
    {
      "createTimeMs": "A String", # The creation time (in ms since epoch) for the label.
      "deprecatedMarketplaceDealParty": { # Information about the party that created the label.
        "buyer": { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal-party.
          "accountId": "A String", # Adx account id of the buyer.
        },
        "seller": { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal party.
          "subAccountId": "A String", # Optional sub-account id for the seller.
          "accountId": "A String", # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the offer.
        },
      },
      "label": "A String", # The label to use.
      "accountId": "A String", # The accountId of the party that created the label.
    },
  ],
  "originatorRole": "A String", # Indicates whether the buyer/seller created the offer.(readonly)
  "revisionTimeMs": "A String", # The time (ms since epoch) when the order was last revised (readonly).
  "sellerContacts": [ # Optional contact information for the seller (buyer-readonly).
    {
      "email": "A String", # Email address of the contact.
      "name": "A String", # The name of the contact.
    },
  ],
  "lastUpdaterRole": "A String",
  "orderState": "A String", # The current state of the order. (readonly)
  "hasSellerSignedOff": True or False, # When an order is in an accepted state, indicates whether the buyer has signed off Once both sides have signed off on a deal, the order can be finalized by the seller. (buyer-readonly)
  "isRenegotiating": True or False, # True if the order is being renegotiated (readonly).
  "buyer": { # Reference to the buyer on the order. (readonly, except on create)
    "accountId": "A String", # Adx account id of the buyer.
  },
  "hasBuyerSignedOff": True or False, # When an order is in an accepted state, indicates whether the buyer has signed off Once both sides have signed off on a deal, the order can be finalized by the seller. (seller-readonly)
  "isSetupComplete": True or False, # True, if the buyside inventory setup is complete for this order. (readonly)
  "revisionNumber": "A String", # The revision number for the order (readonly).
  "lastUpdaterOrCommentorRole": "A String", # The role of the last user that either updated the order or left a comment. (readonly)
  "buyerContacts": [ # Optional contact information fort the buyer. (seller-readonly)
    {
      "email": "A String", # Email address of the contact.
      "name": "A String", # The name of the contact.
    },
  ],
}


Returns:
  An object of the form:

    { # Represents an order in the marketplace. An order is the unit of negotiation between a seller and a buyer and contains deals which are served. Each field in an order can have one of the following setting:
      #
      # (readonly) - It is an error to try and set this field. (buyer-readonly) - Only the seller can set this field. (seller-readonly) - Only the buyer can set this field. (updatable) - The field is updatable at all times by either buyer or the seller.
    "orderId": "A String", # The unique id of the order. (readonly).
    "kind": "adexchangebuyer#marketplaceOrder", # Identifies what kind of resource this is. Value: the fixed string "adexchangebuyer#marketplaceOrder".
    "seller": { # Reference to the seller on the order. (readonly, except on create)
      "subAccountId": "A String", # Optional sub-account id for the seller.
      "accountId": "A String", # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the offer.
    },
    "name": "A String", # The name for the order (updatable)
    "buyerPrivateData": { # Private data for buyer. (hidden from seller).
      "referenceId": "A String",
      "referencePayload": "A String",
    },
    "billedBuyer": { # Reference to the buyer that will get billed for this order. (readonly)
      "accountId": "A String", # Adx account id of the buyer.
    },
    "labels": [ # List of labels associated with the order. (readonly)
      {
        "createTimeMs": "A String", # The creation time (in ms since epoch) for the label.
        "deprecatedMarketplaceDealParty": { # Information about the party that created the label.
          "buyer": { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal-party.
            "accountId": "A String", # Adx account id of the buyer.
          },
          "seller": { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal party.
            "subAccountId": "A String", # Optional sub-account id for the seller.
            "accountId": "A String", # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the offer.
          },
        },
        "label": "A String", # The label to use.
        "accountId": "A String", # The accountId of the party that created the label.
      },
    ],
    "originatorRole": "A String", # Indicates whether the buyer/seller created the offer.(readonly)
    "revisionTimeMs": "A String", # The time (ms since epoch) when the order was last revised (readonly).
    "sellerContacts": [ # Optional contact information for the seller (buyer-readonly).
      {
        "email": "A String", # Email address of the contact.
        "name": "A String", # The name of the contact.
      },
    ],
    "lastUpdaterRole": "A String",
    "orderState": "A String", # The current state of the order. (readonly)
    "hasSellerSignedOff": True or False, # When an order is in an accepted state, indicates whether the buyer has signed off Once both sides have signed off on a deal, the order can be finalized by the seller. (buyer-readonly)
    "isRenegotiating": True or False, # True if the order is being renegotiated (readonly).
    "buyer": { # Reference to the buyer on the order. (readonly, except on create)
      "accountId": "A String", # Adx account id of the buyer.
    },
    "hasBuyerSignedOff": True or False, # When an order is in an accepted state, indicates whether the buyer has signed off Once both sides have signed off on a deal, the order can be finalized by the seller. (seller-readonly)
    "isSetupComplete": True or False, # True, if the buyside inventory setup is complete for this order. (readonly)
    "revisionNumber": "A String", # The revision number for the order (readonly).
    "lastUpdaterOrCommentorRole": "A String", # The role of the last user that either updated the order or left a comment. (readonly)
    "buyerContacts": [ # Optional contact information fort the buyer. (seller-readonly)
      {
        "email": "A String", # Email address of the contact.
        "name": "A String", # The name of the contact.
      },
    ],
  }</pre>
</div>

<div class="method">
    <code class="details" id="search">search(pqlQuery=None)</code>
  <pre>Search for orders using pql query

Args:
  pqlQuery: string, Query string to retrieve specific orders.

Returns:
  An object of the form:

    {
    "orders": [ # The list of matching orders.
      { # Represents an order in the marketplace. An order is the unit of negotiation between a seller and a buyer and contains deals which are served. Each field in an order can have one of the following setting:
          #
          # (readonly) - It is an error to try and set this field. (buyer-readonly) - Only the seller can set this field. (seller-readonly) - Only the buyer can set this field. (updatable) - The field is updatable at all times by either buyer or the seller.
        "orderId": "A String", # The unique id of the order. (readonly).
        "kind": "adexchangebuyer#marketplaceOrder", # Identifies what kind of resource this is. Value: the fixed string "adexchangebuyer#marketplaceOrder".
        "seller": { # Reference to the seller on the order. (readonly, except on create)
          "subAccountId": "A String", # Optional sub-account id for the seller.
          "accountId": "A String", # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the offer.
        },
        "name": "A String", # The name for the order (updatable)
        "buyerPrivateData": { # Private data for buyer. (hidden from seller).
          "referenceId": "A String",
          "referencePayload": "A String",
        },
        "billedBuyer": { # Reference to the buyer that will get billed for this order. (readonly)
          "accountId": "A String", # Adx account id of the buyer.
        },
        "labels": [ # List of labels associated with the order. (readonly)
          {
            "createTimeMs": "A String", # The creation time (in ms since epoch) for the label.
            "deprecatedMarketplaceDealParty": { # Information about the party that created the label.
              "buyer": { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal-party.
                "accountId": "A String", # Adx account id of the buyer.
              },
              "seller": { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal party.
                "subAccountId": "A String", # Optional sub-account id for the seller.
                "accountId": "A String", # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the offer.
              },
            },
            "label": "A String", # The label to use.
            "accountId": "A String", # The accountId of the party that created the label.
          },
        ],
        "originatorRole": "A String", # Indicates whether the buyer/seller created the offer.(readonly)
        "revisionTimeMs": "A String", # The time (ms since epoch) when the order was last revised (readonly).
        "sellerContacts": [ # Optional contact information for the seller (buyer-readonly).
          {
            "email": "A String", # Email address of the contact.
            "name": "A String", # The name of the contact.
          },
        ],
        "lastUpdaterRole": "A String",
        "orderState": "A String", # The current state of the order. (readonly)
        "hasSellerSignedOff": True or False, # When an order is in an accepted state, indicates whether the buyer has signed off Once both sides have signed off on a deal, the order can be finalized by the seller. (buyer-readonly)
        "isRenegotiating": True or False, # True if the order is being renegotiated (readonly).
        "buyer": { # Reference to the buyer on the order. (readonly, except on create)
          "accountId": "A String", # Adx account id of the buyer.
        },
        "hasBuyerSignedOff": True or False, # When an order is in an accepted state, indicates whether the buyer has signed off Once both sides have signed off on a deal, the order can be finalized by the seller. (seller-readonly)
        "isSetupComplete": True or False, # True, if the buyside inventory setup is complete for this order. (readonly)
        "revisionNumber": "A String", # The revision number for the order (readonly).
        "lastUpdaterOrCommentorRole": "A String", # The role of the last user that either updated the order or left a comment. (readonly)
        "buyerContacts": [ # Optional contact information fort the buyer. (seller-readonly)
          {
            "email": "A String", # Email address of the contact.
            "name": "A String", # The name of the contact.
          },
        ],
      },
    ],
  }</pre>
</div>

<div class="method">
    <code class="details" id="update">update(orderId, revisionNumber, updateAction, body)</code>
  <pre>Update the given order

Args:
  orderId: string, The order id to update. (required)
  revisionNumber: string, The last known revision number to update. If the head revision in the marketplace database has since changed, an error will be thrown. The caller should then fetch the lastest order at head revision and retry the update at that revision. (required)
  updateAction: string, The proposed action to take on the order. (required)
    Allowed values
      accept - 
      cancel - 
      propose - 
      unknownAction - 
      updateFinalized - 
  body: object, The request body. (required)
    The object takes the form of:

{ # Represents an order in the marketplace. An order is the unit of negotiation between a seller and a buyer and contains deals which are served. Each field in an order can have one of the following setting:
    # 
    # (readonly) - It is an error to try and set this field. (buyer-readonly) - Only the seller can set this field. (seller-readonly) - Only the buyer can set this field. (updatable) - The field is updatable at all times by either buyer or the seller.
  "orderId": "A String", # The unique id of the order. (readonly).
  "kind": "adexchangebuyer#marketplaceOrder", # Identifies what kind of resource this is. Value: the fixed string "adexchangebuyer#marketplaceOrder".
  "seller": { # Reference to the seller on the order. (readonly, except on create)
    "subAccountId": "A String", # Optional sub-account id for the seller.
    "accountId": "A String", # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the offer.
  },
  "name": "A String", # The name for the order (updatable)
  "buyerPrivateData": { # Private data for buyer. (hidden from seller).
    "referenceId": "A String",
    "referencePayload": "A String",
  },
  "billedBuyer": { # Reference to the buyer that will get billed for this order. (readonly)
    "accountId": "A String", # Adx account id of the buyer.
  },
  "labels": [ # List of labels associated with the order. (readonly)
    {
      "createTimeMs": "A String", # The creation time (in ms since epoch) for the label.
      "deprecatedMarketplaceDealParty": { # Information about the party that created the label.
        "buyer": { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal-party.
          "accountId": "A String", # Adx account id of the buyer.
        },
        "seller": { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal party.
          "subAccountId": "A String", # Optional sub-account id for the seller.
          "accountId": "A String", # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the offer.
        },
      },
      "label": "A String", # The label to use.
      "accountId": "A String", # The accountId of the party that created the label.
    },
  ],
  "originatorRole": "A String", # Indicates whether the buyer/seller created the offer.(readonly)
  "revisionTimeMs": "A String", # The time (ms since epoch) when the order was last revised (readonly).
  "sellerContacts": [ # Optional contact information for the seller (buyer-readonly).
    {
      "email": "A String", # Email address of the contact.
      "name": "A String", # The name of the contact.
    },
  ],
  "lastUpdaterRole": "A String",
  "orderState": "A String", # The current state of the order. (readonly)
  "hasSellerSignedOff": True or False, # When an order is in an accepted state, indicates whether the buyer has signed off Once both sides have signed off on a deal, the order can be finalized by the seller. (buyer-readonly)
  "isRenegotiating": True or False, # True if the order is being renegotiated (readonly).
  "buyer": { # Reference to the buyer on the order. (readonly, except on create)
    "accountId": "A String", # Adx account id of the buyer.
  },
  "hasBuyerSignedOff": True or False, # When an order is in an accepted state, indicates whether the buyer has signed off Once both sides have signed off on a deal, the order can be finalized by the seller. (seller-readonly)
  "isSetupComplete": True or False, # True, if the buyside inventory setup is complete for this order. (readonly)
  "revisionNumber": "A String", # The revision number for the order (readonly).
  "lastUpdaterOrCommentorRole": "A String", # The role of the last user that either updated the order or left a comment. (readonly)
  "buyerContacts": [ # Optional contact information fort the buyer. (seller-readonly)
    {
      "email": "A String", # Email address of the contact.
      "name": "A String", # The name of the contact.
    },
  ],
}


Returns:
  An object of the form:

    { # Represents an order in the marketplace. An order is the unit of negotiation between a seller and a buyer and contains deals which are served. Each field in an order can have one of the following setting:
      #
      # (readonly) - It is an error to try and set this field. (buyer-readonly) - Only the seller can set this field. (seller-readonly) - Only the buyer can set this field. (updatable) - The field is updatable at all times by either buyer or the seller.
    "orderId": "A String", # The unique id of the order. (readonly).
    "kind": "adexchangebuyer#marketplaceOrder", # Identifies what kind of resource this is. Value: the fixed string "adexchangebuyer#marketplaceOrder".
    "seller": { # Reference to the seller on the order. (readonly, except on create)
      "subAccountId": "A String", # Optional sub-account id for the seller.
      "accountId": "A String", # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the offer.
    },
    "name": "A String", # The name for the order (updatable)
    "buyerPrivateData": { # Private data for buyer. (hidden from seller).
      "referenceId": "A String",
      "referencePayload": "A String",
    },
    "billedBuyer": { # Reference to the buyer that will get billed for this order. (readonly)
      "accountId": "A String", # Adx account id of the buyer.
    },
    "labels": [ # List of labels associated with the order. (readonly)
      {
        "createTimeMs": "A String", # The creation time (in ms since epoch) for the label.
        "deprecatedMarketplaceDealParty": { # Information about the party that created the label.
          "buyer": { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal-party.
            "accountId": "A String", # Adx account id of the buyer.
          },
          "seller": { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal party.
            "subAccountId": "A String", # Optional sub-account id for the seller.
            "accountId": "A String", # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the offer.
          },
        },
        "label": "A String", # The label to use.
        "accountId": "A String", # The accountId of the party that created the label.
      },
    ],
    "originatorRole": "A String", # Indicates whether the buyer/seller created the offer.(readonly)
    "revisionTimeMs": "A String", # The time (ms since epoch) when the order was last revised (readonly).
    "sellerContacts": [ # Optional contact information for the seller (buyer-readonly).
      {
        "email": "A String", # Email address of the contact.
        "name": "A String", # The name of the contact.
      },
    ],
    "lastUpdaterRole": "A String",
    "orderState": "A String", # The current state of the order. (readonly)
    "hasSellerSignedOff": True or False, # When an order is in an accepted state, indicates whether the buyer has signed off Once both sides have signed off on a deal, the order can be finalized by the seller. (buyer-readonly)
    "isRenegotiating": True or False, # True if the order is being renegotiated (readonly).
    "buyer": { # Reference to the buyer on the order. (readonly, except on create)
      "accountId": "A String", # Adx account id of the buyer.
    },
    "hasBuyerSignedOff": True or False, # When an order is in an accepted state, indicates whether the buyer has signed off Once both sides have signed off on a deal, the order can be finalized by the seller. (seller-readonly)
    "isSetupComplete": True or False, # True, if the buyside inventory setup is complete for this order. (readonly)
    "revisionNumber": "A String", # The revision number for the order (readonly).
    "lastUpdaterOrCommentorRole": "A String", # The role of the last user that either updated the order or left a comment. (readonly)
    "buyerContacts": [ # Optional contact information fort the buyer. (seller-readonly)
      {
        "email": "A String", # Email address of the contact.
        "name": "A String", # The name of the contact.
      },
    ],
  }</pre>
</div>

</body></html>